package utils;

import java.text.SimpleDateFormat;
import java.time.LocalDate;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-12-06
 * Time: 17:47
 */
public class TimeFormat {
    //获取当前时间，并转换为LocalDate格式
    public static LocalDate timeFormat(){
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String format = simpleDateFormat.format(System.currentTimeMillis());
        LocalDate curTime = LocalDate.parse(format);
        return curTime;
    }
}
